import { BasicColumn } from '@/components/Table';
import { FormSchema } from '@/components/Table';
import { useI18n } from '@/hooks/web/useI18n';

const { t } = useI18n();
export const columns: BasicColumn[] = [
  {
    title: t('名称'),
    align: 'center',
    dataIndex: 'name',
  },
  {
    title: t('具体消息'),
    align: 'center',
    dataIndex: 'message',
  },
  {
    title: 'ip',
    align: 'center',
    dataIndex: 'ip',
  },
  {
    title: t('地址'),
    align: 'center',
    dataIndex: 'location',
  },
  {
    title: t('浏览器'),
    align: 'center',
    dataIndex: 'browser',
  },
  {
    title: t('操作系统'),
    align: 'center',
    dataIndex: 'os',
  },
  {
    title: t('操作类型'),
    align: 'center',
    dataIndex: 'visType',
  },
  {
    title: t('访问时间'),
    align: 'center',
    dataIndex: 'visTime',
  },
  {
    title: t('访问账号'),
    align: 'center',
    dataIndex: 'account',
  },
];

export const searchFormSchema: FormSchema[] = [
  {
    field: 'name',
    label: t('名称'),
    component: 'Input',
    colProps: { span: 8 },
    required: false,
  },
];
